package com.csdj.server.utils;

import com.csdj.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @ClassName: AdminUtil
 * @Author: ZouLi
 * @Description:
 * @Date: 2022/12/30 11:11
 **/
public class AdminUtil {
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
